package br.urca.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "matriculashist")
public class DisciplinaCursada implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private DisciplinaCursadaPK id;
	
	@ManyToOne
	@JoinColumn(name = "Ocorr")
	private SituacaoDisciplina situacao;
	
	@Column(name = "Aval1")
	private Double notaAV1;
	
	@Column(name = "Aval2")
	private Double notaAV2;
	
	@Column(name = "Avfin")
	private Double notaAVF;
	
	@Column(name = "Media")
	private Double media;
	
	@Column(name = "Data", columnDefinition = "DATETIME")
	@Temporal(TemporalType.TIMESTAMP)
	private Date data;
	
	public DisciplinaCursada() { }

	public DisciplinaCursada(DisciplinaCursadaPK id, SituacaoDisciplina situacao, Double notaAV1,
			Double notaAV2, Double notaAVF, Double media, Date data) {
		super();
		this.id = id;
		this.situacao = situacao;
		this.notaAV1 = notaAV1;
		this.notaAV2 = notaAV2;
		this.notaAVF = notaAVF;
		this.media = media;
		this.data = data;
	}

	public DisciplinaCursadaPK getId() {
		return id;
	}

	public void setId(DisciplinaCursadaPK id) {
		this.id = id;
	}

	public SituacaoDisciplina getSituacao() {
		return situacao;
	}

	public void setSituacao(SituacaoDisciplina situacao) {
		this.situacao = situacao;
	}

	public Double getNotaAV1() {
		return notaAV1;
	}

	public void setNotaAV1(Double notaAV1) {
		this.notaAV1 = notaAV1;
	}

	public Double getNotaAV2() {
		return notaAV2;
	}

	public void setNotaAV2(Double notaAV2) {
		this.notaAV2 = notaAV2;
	}

	public Double getNotaAVF() {
		return notaAVF;
	}

	public void setNotaAVF(Double notaAVF) {
		this.notaAVF = notaAVF;
	}

	public Double getMedia() {
		return media;
	}

	public void setMedia(Double media) {
		this.media = media;
	}

	public Date getData() {
		return data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
